import { defHttp } from '@/utils/http/axios';
import { LogModel, QueryLogListParams } from './model/log';
import { BasicFetchResult } from '@/api/model/baseModel'

import { ErrorMessageMode } from '#/axios';

export function getLogList(params: QueryLogListParams, mode: ErrorMessageMode = 'message') {
  return defHttp.get<BasicFetchResult<LogModel>>(
    {
      url: '/log/logs',
      params,
    },
    {
      errorMessageMode: mode
    }
  );
}
